<!--  -->
<template>
  <div>
    <div class="hot_name">
      <span class="line"></span>
      <h2 class="hot_posts"> 退役军人、军人家属招聘专区</h2>
      <!-- <h2 class="hot_posts">灵活就业岗位专区</h2> -->
      <span class="line"></span>
    </div>

    <el-row :gutter="20">
      <el-col :span="8" v-for="(jobFairOutVoList, index) in veteranData" :key="index">
        <div class="company_position_info" @click=" jobToDetais(jobFairOutVoList, index)">
          <div class="job_logo">
            <img
              :src="((jobFairOutVoList.companyInfo && jobFairOutVoList.companyInfo.logo) || require('../../../assets/img/qiye.png'))"
              alt="">
          </div>
          <div class="job_information">
            <p class="titleName">{{jobFairOutVoList.name || '暂无'}}</p>
            <p>{{jobFairOutVoList.educationText || '学历不限'}}
              {{jobFairOutVoList.workExpText ? ('| '  + jobFairOutVoList.workExpText) : ''}}
            </p>
            <p>{{jobFairOutVoList.companyInfo ? jobFairOutVoList.companyInfo.name : '暂无'}}</p>
          </div>
          <div class="job_salary">
            {{jobFairOutVoList.wageText || '3.5K-15K'}}
          </div>
        </div>
      </el-col>
      <!-- <el-col :span="8">
        <div class="grid-content bg-purple"></div>
      </el-col>
      <el-col :span="8">
        <div class="grid-content bg-purple"></div>
      </el-col> -->
    </el-row>
    <!-- <div class="company_positionSoldier"> -->

    <!-- </div> -->
    <div class="seeMore" v-if="true" @click="manyJob()">查看更多</div>
  </div>
</template>

<script>
import { veteran } from '../../../api/homeIndex';
export default {
  components: {},
  data () {
    return {
      veteranData: []
    };
  },
  computed: {},
  watch: {},
  methods: {
    // 请求军人专区接口
    veteran () {
      veteran().then(res => {
        if (res.success) {
          console.log(res.data)
          this.veteranData = res.data
        }
      })
    },
    // 跳转
    manyJob () {
      this.$router.push({
        path: '/JobHunting',
        query: { isVeteran: '1' }
        // query: { all: 'all' }
      })
    },
    jobToDetais (obj) {
      const { href } = this.$router.resolve({
        path: '/JobHunting/jobdetail',
        query: {
          id: obj.id,
          category: obj.category
        },
      });
      window.open(href, '_blank');
    }
  },
  created () {
    // 请求军人专区接口
    this.veteran()
  },
  mounted () {

  },
  beforeCreate () { },
  beforeMount () { },
  beforeUpdate () { },
  updated () { },
  beforeDestroy () { },
  destroyed () { },
  activated () { },
}
</script>
<style scoped>
.hot_name {
    width: 100%;
    height: 93px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.hot_name span {
    width: 50px;
    height: 0px;
    border: 1px solid rgba(204, 204, 204, 1);
    opacity: 1;
}
.hot_posts {
    text-align: center;
    margin: 0 30px;
}
.company_position_info {
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin-top: 15px;
    justify-content: space-between;
    background: #fff;
    cursor: pointer;
}
.company_positionSoldier {
    width: calc(32.5% - 48px);
    padding: 0 24px;
    margin-top: 16px;
    display: flex;
    margin-right: 10px;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    cursor: pointer;
    background: pink;
}
.job_logo {
    width: 68px;
    height: 68px;
    border-radius: 5px;
    background: rgba(242, 242, 242, 1);
}
.job_logo img {
    width: 100%;
    height: 100%;
}
.job_information {
    /* width: 168px; */
    width: 140px;
}
.job_information p {
    line-height: 35px;
    font-size: 14px;
    font-family: PingFang SC;
    font-weight: 400;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: rgba(85, 85, 85, 1);
}
.job_information .titleName {
    font-weight: 600;
    color: rgba(34, 34, 34, 1);
}
.job_salary {
    /* width: 90px; */
    width: 132px;
    text-align: right;
    white-space: nowrap;
}
.job_salary {
    font-size: 16px;
    font-family: PingFang SC;
    font-weight: 600;
    line-height: 22px;
    color: rgba(253, 78, 64, 1);
    opacity: 1;
}
.seeMore {
    width: 340px;
    height: 40px;
    margin: 30px auto;
    border: 1px solid rgba(24, 147, 252, 1);
    opacity: 1;
    text-align: center;
    line-height: 40px;
    font-size: 16px;
    font-family: PingFang SC;
    font-weight: 400;
    color: rgba(24, 147, 252, 1);
    cursor: pointer;
}
</style>